package com.buba.system.controller;


import com.buba.system.service.NewsBulletinService;
import com.buba.utils.R;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 消息公告表 前端控制器
 * </p>
 *
 * @author testjava
 * @since 2022-06-09
 */
@RestController
@RequestMapping("/system/news-bulletin")
public class NewsBulletinController {

    @Autowired
    private NewsBulletinService newsBulletinService;

    /**
     * @Author 梁玉杰
     * @Description //所有就诊指南列表
     * @Return com.buba.utils.R
     * @throws
     * @Date 2022/6/10 16:00
     **/
    @ApiOperation(value = "所有就诊指南列表")
    @PostMapping("/findAllNews")
    public R findAllNews() {
        return newsBulletinService.findAllNews();
    }

    /**
     * @Author 梁玉杰
     * @Description //院区详情
     * @param Integer id
     * @Return com.buba.utils.R
     * @throws
     * @Date 2022/6/10 16:06
     **/
    @ApiOperation(value = "指南详情")
    @GetMapping("/findByNewsID/{id}")
    public R findByNewsID( @ApiParam(name = "id", value = "消息公告表的ID", required = true)
                             @PathVariable Integer id) {
        return newsBulletinService.findByNewsID(id);
    }




}

